#! /bin/bash

echo "Generating source archive...";
mkdir -p ../../bin/sources/$1
echo "Copying files...";
cd ../..
cp TODO ./bin/sources/$1
cp LICENSE ./bin/sources/$1
cp CHANGELOG ./bin/sources/$1
cp COMPILE ./bin/sources/$1
cp nagaina.pro ./bin/sources/$1
cp -r ./images ./bin/sources/$1
cp -r ./src ./bin/sources/$1
cp -r ./translations ./bin/sources/$1
cp -r ./ui ./bin/sources/$1
cp -r ./help ./bin/sources/$1

cd ./bin/sources/$1/images
rm -rf .svn
cd ../src
rm -rf .svn
cd ../translations
rm -rf .svn
cd ../ui
rm -rf .svn
cd ../help
rm -rf .svn
cd ../..

echo "Tar-ing files...";
tar -czf $1.tar.gz $1
echo "done.";


